﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace Store.Web.Models
{
    [DataContract]
    public class Address
    {
        [DataMember]
        [HiddenInput]
        public int Id { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(30)]
        public string FirstName { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(30)]
        public string LastName { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(30)]
        public string Label { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(100)]
        public string Street { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(30)]
        public string City { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [RegularExpression(@"\d{5}")]
        public int ZipCode { get; set; }

        [DataMember]
        [DataType(DataType.Text)]
        [StringLength(30)]
        public string Phone { get; set; }
    }
}